package anthology.daily_question._24_11;
//https://leetcode.cn/problems/find-the-number-of-winning-players/description/?envType=daily-question&envId=2024-11-23
public class _3238求出胜利玩家的数目 {
    class Solution {
        public int winningPlayerCount(int n, int[][] pick) {
            int[][] cnt = new int[n][11];
            for(int[] p : pick){
                cnt[p[0]][p[1]]++;
            }
            int ans = 0;
            for (int i = 0; i < n; i++) {
                for (int c : cnt[i]) {
                    if (c > i) {
                        ans++;
                        break;
                    }
                }
            }
            return ans;
        }
    }
}
